from client_core import SsdevClient
import logging

if __name__ == '__main__':
    logging.basicConfig(filename='myapp.log', level=logging.INFO)

    client = SsdevClient('https://balance.e-bsoft.com.cn/bbp-server/',
                               'https://balance.e-bsoft.com.cn/bbp-server/')
    rsp = client.my_roles('dzgl', 'system', '123')
    my_roles = rsp['body']
    print(my_roles)

    token = client.fetch_token('dzgl', 'system', my_roles[0])
    print(token)

    invoke_rsp = client.invoke('pay-balance-service.demoService', 'echo', "abc")
    print(invoke_rsp)
